package com.gregbugaj.gps;

public enum CommandType {
	//Lat/Lon data
	GPGLL(),
	//VTG - Velocity made good
	GPVTG();
	
	/**
	 * Get Type from string 
	 * @param val can be prefixed with $
	 * @return
	 */
	public static CommandType fromValue(String val){
		if(val.startsWith("$")){
			val=val.substring(1);
		}
		for(CommandType type:values()){
			if(type.name().equals(val)){
				return type;
			}
		}
		return null;
	}
}
